import base from './base'
import axios from 'axios'

export default {
    getHomeCount(){
        return axios.get(base.homeCount);
    },
    getHomeFormat(){
        return axios.get(base.homeFormat);
    },
    getHomeOrder(){
        return axios.get(base.homeOrder);
    },
    getprojectList(params){
        return axios.get(base.projectList,{params});
    },
    getprojectSearch(params){
        return axios.get(base.projectSearch,{params});
    },
    deleteGoodItem(params){
        return axios.get(base.delGoodItem,{params});
    },
    getGoodsCategory(params){
        return axios.get(base.getGoodsCategory,{params});
    },
    addGoodItem(params){
        return axios.get(base.insertTbItem,{params});
    },
    batchDelete(params){
        return axios.get(base.batchDelete,{params})
    },
    updateGoodItem(params){
        return axios.get(base.updateGoodItem,{params})
    },
    getitemCategory(){
        return axios.get(base.itemCategory);
    },

    //  // 增加一级导航类目
    // insertCategory: "/api/itemCategory/insertCategory",
    // // 修改导航类目
    // updateCategory: "/api/itemCategory/updateCategory",
    // // 删除导航 id
    // deleteContentCategoryById: "/api/content/deleteContentCategoryById",
    // // 增加子导航
    // insertItemCategory: "/api/itemCategory/insertItemCategory"
    insertCategory(params){
        return axios.get(base.insertCategory,{params});
    },
    updateCategory(params){
        return axios.get(base.updateCategory,{params});
    },
    deleteContentCategoryById(params){
        return axios.get(base.deleteContentCategoryById,{params});
    },
    insertItemCategory(params){
        return axios.get(base.insertItemCategory,{params});
    },
    getOrderList(params){
        return axios.get(base.getOrderList,{params});
    },
    changeOrderStatus(params){
        return axios.get(base.changeOrderStatus,{params});
    },
    getOrderDetail(){
        return axios.get(base.getOrderDetail);
    },
    getOrderCollect(params){
        return axios.get(base.getOrderCollect,{params});
    },
    cancelOrderCollect(params){
        return axios.get(base.cancelOrderCollect,{params});
    },
    // 登录分权
    tryLogin(params){
        console.log(params);
        return axios.post(base.login,params);
    },
    tryPermission(params){
        return axios.get(base.permission,{params})
    }
}

export function tryPermission(params){
    return axios.get(base.permission, { params })
}